/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ia_0.data_model.actions;

import ia_0.data_model.character.Character;
import ia_0.data_model.character.POI;
import ia_0.*;
import java.awt.Point;

/**
 *
 * @author jderenty
 */
public class ActionManger extends Action{
    Point food;


    public ActionManger(Character c){
        super(c);
    }

    public boolean toDo() {
        if(c.hungry<0){
            return true;
        }
        return false;
    }

    @Override
    public void doIt() {
        if(m==null){
            food=c.knowledge.getPoi(POI.TypePOI.food).getPos();
            m=new Move(c, food);
        }

        if(m.iterate().equals(food)){
            c.hungry+=100;
            m=null;
                setTermine();
        }

    }

}
